const mongoose = require("mongoose");
//必须引入Category模型，否则关联查询报错
require("./Category");
const CommonditySchema = new mongoose.Schema({
    name: { type: String },
    price: { type: Number },
    cat: { type: mongoose.SchemaTypes.ObjectId, ref: "Category" },
    dsc: { type: String },
    orderIndex: { type: Number },
    covers: [{ type: String }],
});
module.exports = mongoose.model("Commodity", CommonditySchema);
